package com.leather.question.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leather.common.entity.Question;
import com.leather.common.result.Result;
import com.leather.question.vo.QuestionAddVo;

public interface QuestionService extends IService<Question> {


    /**
     * 首页数据
     * @param pageId
     * @return
     */
    Result index(int pageId);


    /**
     * 提问
     * @param questionAddVo
     * @return
     */
    Result addQuestion(QuestionAddVo questionAddVo);

    /**
     * 点赞
     * @param questionId
     * @return
     */
    Result star(int questionId);

    /**
     * 删除问题
     * @param questionId
     * @param userId
     * @return
     */
    Result deleteQuestion(int questionId,int userId);

    /**
     * 根据id获取问题
     * @param questionId
     * @return
     */
    Result getQuestionById(int questionId);

    /**
     * 获取所有的用户数据
     * @param userId
     * @return
     */
    Result getUserQuestion(int userId, Page<Question> pages);


    /**
     * 获取用户的回答数和问题数
     * @param userId
     * @return
     */
    Result getCount(int userId);


    /**
     * 邀请用户
     * @return
     */
    Result getInviteUser(int questionId,int userId);


    /**
     * 邀请用户
     * @param quesionId
     * @param userId
     * @return
     */
    Result inviteUsers(int quesionId,int userId,int inviteId);
}
